<?php
class Student_TrackerController extends Zend_Controller_Action
{

    /*
     * Assessments:
     * Assessment Names
     * Grades thus far
     * 
     *
     * Goals:
     * Desired Grade:
     * Score equivalent of that grade (minimum)
     * That score expected from each group.
     *
     * Current Status:
     * Assessment Count
     * Average on each group
     * Current Average.
     * Need to do better/ doing great.
     *
     *
     * Grade Probability:
     *Desired Average vs Current Average
     * how much improvement needed (this will be the outcome of my algorithm
     */


     public function init()
    {
       
    }

    public function indexAction()
    {
        $form = new Student_Form_TrackerForm();
        $this->view->form = $form;
        $course_id = $this->_getParam('id');
        $for_name = new Student_Model_DbTable_Course();
        $name = $for_name->getCourseDetails($course_id);
        $the_name = null;
        foreach($name as $n){
            $the_name = $n->course_name." ($n->course_number)";
        }

        $this->view->title = "<b>Performance Tracker for $the_name</b><br><br>";
       $this->view->headTitle($this->view->title, 'PREPEND');
       
       
       $track = new Student_Model_DbTable_Tracker();
      $currentGrades = $track->currentGrades($course_id);
      $currentGoal = $track->currentGoal($course_id);
      $currentStanding = $track->currentStanding($course_id);
      $gradeExpect = $track->gradeExpect($course_id);
      
      $this->view->grades = $currentGrades;
      $this->view->goal = $currentGoal;
      $this->view->standing = $currentStanding;
      $this->view->expect = $gradeExpect;

      
    }

    
    
    }

?>
